package com.bw.jetpacktest.databinding;

import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import com.bw.jetpacktest.R;

public class DoubleActivity extends AppCompatActivity {

    private Entity entity = new Entity();
    private ActivityDoubleBinding binding;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = DataBindingUtil.setContentView(this, R.layout.activity_double);
        binding.setValue(entity);
        binding.getRoot().findViewById(R.id.double_change_btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(DoubleActivity.this,entity.msg.get(),Toast.LENGTH_SHORT).show();
            }
        });
    }
}
